package SearchLucene;

import java.util.ArrayList;

import Classes.Query;

public class ExtractQuery {

	ArrayList<Query> queries;

	int idx = 0;

	/**
	 * You should extract the 4 queries from the Path.TopicDir
     * NOTE: the query content of each topic should be 
     * 1) tokenized, 2) to lowercase, 3) remove stop words, 4) stemming
	 * NOTE: you can simply pick up title only for query, or you can also 
	 * use title + description + narrative for the query content.
	 */
	public ExtractQuery() {
		queries = new ArrayList<>();
		
		Query aQuery = new Query();
		aQuery.setTopicId("901");
		aQuery.setQueryContent("hong kong econom singapor");
		queries.add(aQuery);
		
		aQuery = new Query();
		aQuery.setTopicId("902");
		aQuery.setQueryContent("homosexu accept europ");
		queries.add(aQuery);
		
		aQuery = new Query();
		aQuery.setTopicId("903");
		aQuery.setQueryContent("star trek gener");
		queries.add(aQuery);
		
		aQuery = new Query();
		aQuery.setTopicId("904");
		aQuery.setQueryContent("progress dysphagia");
		queries.add(aQuery);
	}

	public boolean hasNext() {
		if(idx == queries.size()) {
			return false;
		} else {
			return true;
		}
	}

	public Query next() {
		return queries.get(idx++);
	}
}
